<!DOCTYPE html>
<html>
	{include file="public/header" /}
	<style>
		.demo-cp-item {
            display: inline-block;
            text-align: center;
            margin: 8px 25px 0 25px;
            color: #666;
        }

        .demo-cp-item > div:nth-child(2) {
            margin-top: 6px;
        }

        /** 自定义样式1 */
        #demoProgress9 .circle-progress-value {
            stroke-width: 11px;
            stroke: #00CC00;
            stroke-dasharray: 0 23.3;
            stroke-linecap: round;
        }

        #demoProgress9 .circle-progress-circle {
            stroke: transparent;
        }

        #demoProgress9 .circle-progress-text {
            font-family: "Gotham rounded";
            font-size: 16px;
            fill: #00CC00;
        }

        /** 自定义样式2 */
        #demoProgress10 .circle-progress-circle {
            stroke-width: 6px;
            stroke: #ccc;
            stroke-dasharray: 1 5;
            stroke-dashoffset: 1.6;
        }

        #demoProgress10 .circle-progress-value {
            stroke: #43A3FB;
        }

        #demoProgress10.circle-progress-success .circle-progress-value {
            stroke: #5CB85C;
        }

        #demoProgress10.circle-progress-success .circle-progress-text {
            fill: #5CB85C;
        }

        /** 自定义样式3 */
        #demoProgress11 .circle-progress-value {
            stroke-width: 8px;
            stroke: #3FDABA;
        }

        #demoProgress11 .circle-progress-circle {
            stroke-width: 6px;
            stroke: #E0FAF1;
        }

        /** 自定义样式4 */
        #demoProgress12 .circle-progress-value {
            stroke-width: 22px;
            stroke: #3FDABA;
            stroke-dasharray: 60 2;
            stroke-linecap: butt;
        }

        #demoProgress12 .circle-progress-circle {
            stroke: #E0FAF1;
            stroke-width: 22px;
            fill: #E0FAF1;
        }

        #demoProgress12 .circle-progress-text {
            font-family: "Gotham";
            font-size: 16px;
            fill: #3FDABA;
        }

        /** 自定义样式5 */
        #demoProgress13 > svg {
            width: 40px;
            height: 40px;
        }

        #demoProgress13 .circle-progress-value {
            stroke-width: 8px;
        }

        #demoProgress13 .circle-progress-circle {
            stroke-width: 8px;
        }

        #demoProgress13 .circle-progress-text {
            font-size: 30px;
        }
		/** 统计快捷方式样式 */
		.console-link-block {
			display: block;
			position: relative;
			color: #fff;
			font-size: 18px;
			padding: 25px 20px;
			border-radius: 2px;
			overflow: hidden;
			background-color: rgb(155, 197, 57);
		}

		.console-link-block .console-link-block-num {
			font-size: 40px;
			font-weight: bold;
			margin-bottom: 10px;
		}

		.console-link-block .console-link-block-icon {
			height: 70px;
			position: absolute;
			right: 20px;
			top: 50%;
			transform: translateY(-50%);
		}

		.console-link-block .console-link-block-band {
			background-color: rgb(227, 42, 22);
			font-size: 14px;
			position: absolute;
			width: 80px;
			padding: 0px 0;
			text-align: center;
			transform: rotate(45deg);
			right: -21px;
			top: 8px;
			color: rgba(255, 255, 255, .9);
			z-index: 1;
		}
		/** 设置每个快捷块的颜色 */
		#consoleLink > div:first-child .console-link-block {
			background-color: rgb(155, 197, 57);
		}

		#consoleLink > div:nth-child(2) .console-link-block {
			background-color: rgb(85, 165, 234);
		}

		#consoleLink > div:nth-child(3) .console-link-block {
			background-color: rgb(157, 175, 291);
		}

		#consoleLink > div:nth-child(4) .console-link-block {
			background-color: rgb(245, 145, 162);
		}

		#consoleLink > div:nth-child(5) .console-link-block {
			background-color: rgb(254, 170, 79);
		}

		#consoleLink > div:last-child .console-link-block {
			background-color: rgb(64, 212, 176);
		}

		/** //设置每个快捷块的颜色end */
    </style>
	<body>

		<!-- 正文开始 -->
		<div class="layui-fluid">
			<!-- 快捷方式 -->
			<div id="consoleLink" class="layui-row layui-col-space15">
				<div class="layui-col-lg3 layui-col-md3 layui-col-sm3 layui-col-xs3">
					<div class="console-link-block" ew-href="page/system/user.html" ew-title="外出申请">
						<div class="console-link-block-num">{$info.teacher_count}</div>
						<div class="console-link-block-text">老师数</div>
						<img class="console-link-block-icon" src="__STATIC__/admin/images/homepic1.png">
					</div>
				</div>
				<div class="layui-col-lg3 layui-col-md3 layui-col-sm3 layui-col-xs3">
					<div class="console-link-block" ew-href="page/system/role.html" ew-title="请假审批">
						<div class="console-link-block-num">{$info.student_count}</div>
						<div class="console-link-block-text">学生数</div>
						<img class="console-link-block-icon" src="__STATIC__/admin/images/homepic2.png">
					</div>
				</div>
				<div class="layui-col-lg3 layui-col-md3 layui-col-sm3 layui-col-xs3">
					<div class="console-link-block" ew-href="page/system/authorities.html" ew-title="研发周报">
						<img class="console-link-block-icon" src="__STATIC__/admin/images/homepic3.png">
						<div class="console-link-block-num">{$info.classes_count}</div>
						<div class="console-link-block-text">班级数</div>
					</div>
				</div>
				<div class="layui-col-lg3 layui-col-md3 layui-col-sm3 layui-col-xs3">
					<div class="console-link-block" ew-href="page/system/authorities.html" ew-title="研发周报">
						<img class="console-link-block-icon" src="__STATIC__/admin/images/homepic3.png">
						<div class="console-link-block-num">{$info.parents_count}</div>
						<div class="console-link-block-text">家长数</div>
					</div>
				</div>

			</div>
			<div class="layui-row layui-col-space15">
				<div class="layui-col-xs12 layui-col-sm12 layui-col-md6">
					<div class="layui-card">
						<div class="layui-card-header">
							<span>新闻动态</span>
							<span style="float: right;"><a style="color: #179cff;cursor: pointer" id="newsMore">更多</a></span>
						</div>
						<div class="layui-card-body">
							<table class="layui-hide" id="test" lay-filter="test"></table>
						</div>
					</div>
				</div>
				<div class="layui-col-xs12 layui-col-sm12 layui-col-md6">
					<div class="layui-card">
						<div class="layui-card-header">
							<span>通知公告</span>
							<span style="float: right;"><a style="color: #179cff;cursor: pointer" id="noticeMore">更多</a></span>
						</div>
						<div class="layui-card-body">
							<table class="layui-hide" id="notice" lay-filter="notice"></table>
						</div>
					</div>
				</div>
				</div>

		</div>
	</body>
	<script type="text/javascript">
		layui.config({
			base: '__STATIC__/layuiadmin/' //静态资源所在路径
		}).extend({
			index: 'lib/index', //主入口模块
		}).use(['layer', 'element','table','util', 'laydate'], function() {
			var $ = layui.jquery;
			var layer = layui.layer;
			var element = layui.element;
			var table = layui.table;
			$("#newsMore").click(function(){
				parent.layui.index.openTabsPage("{:url('bancard/News/index')}", "新闻动态");
			})
			$("#noticeMore").click(function(){
				parent.layui.index.openTabsPage("{:url('bancard/Notice/index')}", "通知公告");
			})

			var tableIns = table.render({
				elem: '#test',
				url: "{:url('bancard/News/lists')}",
				method: "POST",
				request: {
					pageName: 'offset', //页码的参数名称，默认：page
					limitName: 'limit' //每页数据量的参数名，默认：limit
				},
				cols: [
					[{
						field: 'id',
						title: "id",
						width: 80
					}, {
						field: 'sort',
						title: "排序",
						width: 80,
						sort: true
					}, {
						field: 'title',
						title: "标题"
					}, {
						field: 'start_time',
						title: "开始日期",
						sort: true
					}, {
						field: 'end_time',
						title: "结束日期",
						sort: true
					}, {
						field: 'created_at',
						title: "发布日期",
						sort: true
					}, {
						field: 'platform',
						title: "来源",
						width: 80,
						templet: function(d) {
							if (d.platform == 1) {
								var check = "后台";
							} else if (d.platform == 2) {
								var check = "APP";
							}else if (d.platform == 3) {
								var check = "其他";
							}
							return check;
						},
						sort: true
					}]
				]
			});
			var tableNotice = table.render({
				elem: '#notice',
				url: "{:url('bancard/Notice/lists')}",
				method: "POST",
				request: {
					pageName: 'offset', //页码的参数名称，默认：page
					limitName: 'limit' //每页数据量的参数名，默认：limit
				},
				cols: [
					[{
						field: 'id',
						title: "id",
						width: 80
					}, {
						field: 'sort',
						title: "排序",
						width: 80,
						sort: true
					}, {
						field: 'title',
						title: "标题"
					},{
						field: 'start_time',
						title: "开始日期",
						sort: true
					}, {
						field: 'end_time',
						title: "结束日期",
						sort: true
					}, {
						field: 'created_at',
						title: "发布日期",
						sort: true
					}, {
						field: 'platform',
						title: "来源",
						width: 80,
						templet: function(d) {
							if (d.platform == 1) {
								var check = "后台";
							} else if (d.platform == 2) {
								var check = "APP";
							}else if (d.platform == 3) {
								var check = "其他";
							}
							return check;
						},
						sort: true
					}]
				]
			});
		});
	</script>
</html>
